# @shuaige : 陈世玉
# @name :04handler代理id.py
# @time :2024/12/3 22:55
import urllib.request
from urllib.request import HTTPHandler,ProxyHandler

url='https://iplark.com/myip'
headers={
    "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"
}
request=urllib.request.Request(url)
proxies={
    'http':'47.108.158.113:9090'
}
handler=ProxyHandler(proxies=proxies)
opener=urllib.request.build_opener(handler)
response=opener.open(request)
content=response.read().decode()
with open ('1.html','w',encoding='utf-8') as f:
    f.write(content)

